/**
 * plugins/index.ts
 *
 * Automatically included in `./src/main.ts`
 */

// Plugins
import i18n from "../locales";
//import { store } from "../store";
import router from "../router";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "element-plus/theme-chalk/dark/css-vars.css";
import zhCn from "element-plus/es/locale/lang/zh-cn";
// import "dayjs/locale/zh-cn"; //日期和时间本地化
// import "dayjs/locale/zh-tw"; //日期和时间本地化
// Types
import type { App } from "vue";
// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

export function registerPlugins(app: App) {
  // loadFonts() use(vuetify)  .use(store)
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
  }
  app.use(i18n).use(router).use(ElementPlus, {
    locale: zhCn,
  });
}
